#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>
#include <assert.h>

int my_strncmp(char* p1, char* p2, int num)
{
	assert(p1 != NULL);
	assert(p2 != NULL);
	
	while ((*p1 == *p2) && num)
	{
		if (*p1 == '\0')
			return 0;
		p1++;
		p2++;
		num--;
	}
	if (num == 0)
		return 0;
	return *p1 - *p2;
}
int main()
{
	char arr1[] = "hello world";
	char arr2[] = "hello world";

	int snc = my_strncmp(arr1, arr2, 20);
	if (snc > 0)
		printf(">\n");
	else if (snc < 0)
		printf("<\n");
	else
		printf("=\n");
	return 0;
}